POV-Ray : Newsgroups : povray.text.scene-files : Return of the Beach, by Kevin Wampler : Return of the Beach, by Kevin Wampler Server Time
28 Jul 2024 14:35:23 EDT (-0400)
  Return of the Beach, by Kevin Wampler  
From: Bob Hughes
Date: 15 Feb 2000 13:49:17
Message: <38a99fad@news.povray.org>
// Ctrl-A, Ctrl-C, Ctrl-V this message for fastest copy and paste
// This scene needs Superpatch (or MegaPov) to render
// Kevin Wampler kev### [at] tapestrytucsonazus
// scene changes made by Bob Hughes inv### [at] aolcom
// Beach and Water, Aug 14, 1999 and Feb 15, 2000
// Note: bounded_by was changed to contained_by for the isosurfaces

#version unofficial MegaPov 0.4;

// 0 for the original scene, 1 for my changed scene.
#declare WhichBeach = 0;

#switch (WhichBeach)
#case (0)

camera {

  location  <-2, 3, -6>*4
  direction 2.0*z
  up        y
  right     4/3*x
  look_at   <0, 3,  0>
}

light_source {
  0*x
  color rgb <1,1,1>
  translate <-2000, 4000, -3000>

}

sky_sphere {
  pigment
  {
    gradient y
    color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] }
  }
}

plane {
  y, -50
  texture { pigment { color rgb <1,.9,.8> } }
}

cylinder {
  <3,-10,15> <3,5,15>, 1
  texture {
    pigment { color rgb <1,1,1> }
    normal { wrinkles .1 scale <.1,1,.1> }
    finish { specular .2 roughness .035 }
  }
}

// ************************ Sand****************************

#declare Sand = function { y+.2*z+noise3d(x/10,0,z/10) }

#declare Sandtex = texture { pigment { color rgb <1,.9,.8> } }

isosurface {
  function { Sand }
  max_gradient 5
  contained_by { box { <-1000,-11,-1000>, <1000,2,1000> } }
  texture { Sandtex }
}

// ************************ Water***************************

#declare Waves = function { pigment {
  marble
  color_map {
    [ 0 rgb 0 ]
    [ 1 rgb 1 ]
  }
  scale 3
} }

#declare Water2 = function {
.2*(-y+1)*noise3d(.5*x,.5*y,.5*z)^2+.04*noise3d(2*x,2*y,(2*y+1)*z) }

#declare Water = function {
y-Waves(.1*x+.25*y,y,z)^2+.005*noise3d(1*x,1*y,3*z)-Water2(x,y,z) }

#declare Sea = texture {
  pigment { color rgbt <1,1,1,1> }
  finish { specular .5 roughness .005 reflection_type 1 }
}

#declare Foam = texture {
  pigment {
    crackle
    color_map {
      [ 0 color rgbt <1,1,1,0> ]
      [ 1 color rgbt <1,1,1,.6> ]
    }
    turbulence .5
    scale .5
  }
  normal { bumps .2 scale .1 }
  finish { specular .5 roughness .005 }
}

#declare Watertex = texture {
  function { max(0,min(1,Sand(x,y,z))) }
  texture_map {
    [ 0 Foam ]
    [ .5 Sea ]
    [ 1 Sea ]
  }
}

#declare Waterint = interior {
  ior 1.33 caustics 10
  fade_distance 3 fade_power 2
}

isosurface {
  function { Water(x,y,z) }
  max_gradient 10
  contained_by { box { <-1000,-100,-1000>, <1000,2,1000> } }
  texture { Watertex rotate <0,-90,0> }
  interior { Waterint }
  rotate <0,90,0>
  hollow
}

#break
#case (1)

// &&&&&&&&&&&&&&&& changed script version &&&&&&&&&&&&&&&

global_settings {
        assumed_gamma 2.4
        ambient_light <1.25,1.33,1.5>
        max_trace_level 5
}

camera {

  location  <-2, 3, -6>*4
 // direction 2.0*z
  angle 67
  up        y
  right     4/3*x
  look_at   <0, 3,  0>
}

light_source {
  0*x
  color rgb <1,.925,.85>*1.33
  translate <0, 0, -999>
 rotate <30,-100,0>
}

sphere {0,1
  pigment {
    gradient y
    color_map {
     [0.0 color rgb <0.85,0.825,.875>][0.05 color rgb <0.65,0.85,1.0>]
     [0.2 color rgb <0.4,0.65,.9>][1.0 color rgb <.35,.5,.7>]
      }
  }
   finish {ambient .9 diffuse .1}
  scale 1000 hollow
}

// undisturbed ground fog
fog {
  fog_type   2
  distance   667
  color      rgbft <0.925,0.875,0.9,.4,.6>
  fog_offset 3
  fog_alt    9
}

plane {
  y, -50
  texture { pigment { color rgb <1,.9,.8> } }
}

cylinder {
  -10*z,5*z, 1
  texture {
    pigment { wood octaves 2 omega .6 lambda 1.4 turbulence .2 frequency 6
        color_map {
                [0,.25 color rgb <.2,.15,.1> color rgb <.3,.25,.05>]
                [.25,.75 color rgb <.45,.275,.1> color rgb <.3,.125,.075>]
                 } }
    normal { wood .9 scale <.15,.15,1> }
    finish { specular .2 roughness .035 } rotate <0,0,0> scale 3
  }
 rotate -90*x translate <10,0,20>
}

cylinder {
  -10*z,5*z, 1
  texture {
    pigment { wood octaves 2 omega .6 lambda 1.4 turbulence .2 frequency 6
        color_map {
                [0,.25 color rgb <.2,.15,.1> color rgb <.3,.25,.05>]
                [.25,.75 color rgb <.45,.275,.1> color rgb <.3,.125,.075>]
                 } }
    normal { wood .9 scale <.15,.15,1> }
    finish { specular .2 roughness .035 } rotate <0,0,90> scale 3
  }
 rotate -90*x translate <10,0,7.5>
}

cylinder {
  -10*z,5*z, 1
  texture {
    pigment { wood octaves 2 omega .6 lambda 1.4 turbulence .2 frequency 6
        color_map {
                [0,.25 color rgb <.2,.15,.1> color rgb <.3,.25,.05>]
                [.25,.75 color rgb <.45,.275,.1> color rgb <.3,.125,.075>]
                 } }
    normal { wood .9 scale <.15,.15,1> }
    finish { specular .2 roughness .035 } rotate <0,0,-90> scale 3
  }
 rotate -90*x translate <10,0,-5>
}

cylinder {
  -10*z,5*z, 1
  texture {
    pigment { wood octaves 2 omega .6 lambda 1.4 turbulence .2 frequency 6
        color_map {
                [0,.25 color rgb <.2,.15,.1> color rgb <.3,.25,.05>]
                [.25,.75 color rgb <.45,.275,.1> color rgb <.3,.125,.075>]
                 } }
    normal { wood .9 scale <.15,.15,1> }
    finish { specular .2 roughness .035 } rotate <0,0,0> scale 3
  }
 rotate -90*x translate <20,0,20>
}

cylinder {
  -10*z,5*z, 1
  texture {
    pigment { wood octaves 2 omega .6 lambda 1.4 turbulence .2 frequency 6
        color_map {
                [0,.25 color rgb <.2,.15,.1> color rgb <.3,.25,.05>]
                [.25,.75 color rgb <.45,.275,.1> color rgb <.3,.125,.075>]
                 } }
    normal { wood .9 scale <.15,.15,1> }
    finish { specular .2 roughness .035 } rotate <0,0,90> scale 3
  }
 rotate -90*x translate <20,0,7.5>
}

cylinder {
  -10*z,5*z, 1
  texture {
    pigment { wood octaves 2 omega .6 lambda 1.4 turbulence .2 frequency 6
        color_map {
                [0,.25 color rgb <.2,.15,.1> color rgb <.3,.25,.05>]
                [.25,.75 color rgb <.45,.275,.1> color rgb <.3,.125,.075>]
                 } }
    normal { wood .9 scale <.15,.15,1> }
    finish { specular .2 roughness .035 } rotate <0,0,-90> scale 3
  }
 rotate -90*x translate <20,0,-5>
}

// **************************Sand***************************

#declare Sand = function { y+.2*z+noise3d(x/10,0,z/10) }

#declare Sandtex =
// texture { pigment { color rgb <1,.9,.8> } // beige sand
//  finish { ambient .15 diffuse .75 phong .2 phong_size 123 crand .03 }
// }
 texture { pigment { color rgb <.98,.95,.93> } // white sand
  finish { ambient .175 diffuse .725 phong .25 phong_size 123 crand .0333 }
}


isosurface {
  function { Sand }
  max_gradient 5
  contained_by { box { <-1000,-11,-1000>, <1000,2,1000> } }
  texture { Sandtex }
}

// ***********************Water************************

#declare Waves = function { pigment {
  marble turbulence .1
  color_map {
    [ 0 rgb 0 ]
    [ 1 rgb 1 ]
  }
  scale 3
} }

#declare Water2 = function {
.2*(-y+1)*noise3d(.5*x,.5*y,.5*z)^2+.04*noise3d(2*x,2*y,(2*y+1)*z) }

#declare Water = function {
y-Waves(.1*x+.25*y,y,z)^2+.005*noise3d(1*x,1*y,3*z)-Water2(x,y,z) }

#declare Sea = texture {
  pigment { color rgbft <.85,.95,.975,.5,.8> }
  finish { ambient .2 diffuse .5 specular .5 roughness .005
         reflection_type 1 reflection_min .1 reflection_max .7
          }
}

#declare Foam = texture {
  pigment {
    crackle
    color_map {
      [ 0 color rgbt <1.3,1.3,1.3,0> ]
      [ 1 color rgbt <1,1,1,.6> ]
    }
    turbulence .5
    scale .5
  }
  normal { bumps .2 scale .1 }
  finish { ambient .25 diffuse .7 specular .25 roughness .0075 }
}

#declare Watertex = texture {
  function { max(0,min(1,Sand(x,y,z))) }
  texture_map {
    [ 0 Foam ]
    [ .5 Sea ]
    [ 1 Sea ]
  }
}

#declare Waterint = interior {
  ior 1.33 caustics 2
  fade_distance 4 fade_power 2 fade_color <.6,.85,.775>*.3
}

isosurface {
  function { Water(x,y,z) }
  max_gradient 10
  contained_by { box { <-1000,-100,-1000>, <1000,2,1000> } }
  texture { Watertex rotate <0,-90,0> }
  interior { Waterint }
  rotate <0,90,0>
 // hollow
}

// ship
union {
        difference {
prism {
    conic_sweep
    cubic_spline
    .25,
    1,
    8,
    <4,-6>, <3,4>, <-2,2>, <-7,0>, <-2,-2>, <3,-4>, <3,4>, <-5,6>
}
sphere {<0,.5,-.5>,4 inverse}

    pigment {gradient y
        color_map {
                 [.67 color rgb <.095,.095,.095>]
                 [.67 color rgb <.95,.095,.095>]
                 [.75 color rgb <.95,.095,.095>]
                 [.75 color rgb <.95,.95,.95>]
    } }
    normal {radial .1 frequency 32 ramp_wave}
     finish {ambient .5 diffuse .5 specular .3 roughness .015 metallic .4
brilliance 2
         reflection <.01,.015,.02>}
     scale <1,3,.75>*2 rotate 90*y
  }
cylinder {-z,z,1 scale <7.5,7.5,12>*.25
    pigment {gradient y
        color_map {
                 [.25 color rgbt <.095,.095,.095,1>]
                 [.25 color rgb <.95,.95,.95>]
                 [.75 color rgb <.95,.95,.95>]
                 [.75 color rgbf <.5,.75,.95,.9>]
    } }
     normal {radial .1 frequency 32 ramp_wave}
     finish {ambient .25 diffuse .5 specular .3 roughness .015 metallic .4
brilliance 2
         reflection <.01,.015,.02>} translate <0,6.67,2>
}
cylinder {0,y,1
    pigment {gradient y
        color_map {
                 [.25 color rgb <.95,.95,.95>]
                 [.25 color rgb <.095,.095,.095>]
                 [.75 color rgb <.095,.095,.095>]
                 [.75 color rgb <.95,.095,.095>]
    } }
     normal {radial .1 frequency 32 ramp_wave}
     finish {ambient .25 diffuse .5 specular .3 roughness .015 metallic .4
brilliance 2
         reflection <.01,.015,.02>}
      scale <3,10,2.5>*.25 rotate 30*x translate <0,7.5,2.5>
}
cone {0,1,y,4 hollow
    pigment {gradient y turbulence .1
        color_map {
                 [.25 color rgbft <.125,.125,.125,1,.75>]
                 [.5 color rgbft <.25,.25,.25,.75,.75>]
                 [.75 color rgbft <.33,.33,.33,.5,.85>]
                 [1 color rgbft <.5,.5,.5,0,1>]
    } scale 1.05}
     normal {granite 1 scallop_wave scale .5}
     scale <3,100,3>*.25 rotate 60*x translate <0,10,3>
}

 rotate <0,70,0> translate <-125,-2,750>
}

#break
#end

//  omniVerse http://users.aol.com/persistenceofv/all.htm


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.